﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SceneCtrlBase : MonoBehaviour {




    #region MonoBehaviour
    private void Awake()
    {
        OnAwake();
    }

    private void Start()
    {
        OnStart();
    }

    private void Update()
    {
        OnUpdate();
    }

    private void OnDestroy()
    {
        BeforeOnDestroy();
    }
    #endregion

    #region Protected Function
    /// <summary>
    /// Start时调用
    /// </summary>
    protected virtual void OnStart() { }
    /// <summary>
    /// OnDestroy时调用
    /// </summary>
    protected virtual void BeforeOnDestroy() { }
    /// <summary>
    /// Awake时调用
    /// </summary>
    protected virtual void OnAwake() { }
    /// <summary>
    /// Update时调用
    /// </summary>
    protected virtual void OnUpdate() { }
    /// <summary>
    /// 玩家点击时调用
    /// </summary>
    protected virtual void OnPlayerClick() { }
    /// <summary>
    /// 手指拖拽开始时调用
    /// </summary>
    protected virtual void OnFingerBeginDrag() { }
    /// <summary>
    /// 手指拖拽中调用
    /// </summary>
    /// <param name="screenPos"></param>
    protected virtual void OnFingerDrag(Vector2 screenPos) { }
    /// <summary>
    /// 手指拖拽结束调用
    /// </summary>
    protected virtual void OnFingerEndDrag() { }


    #endregion
}
